.markdown {
  color: @site-text-color;
  font-size: 14px;
  line-height: 2;
  display: block;
  &.api-container {
    overflow-x: auto;

    table {
      min-width: 719px;
      margin: 2em 0;
      font-size: 14px;
      font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,Courier,monospace;
      line-height: 1.5;
      border-width: 0;
    }
  }
}

.highlight {
  line-height: 1.5;
}

.markdown img {
  max-width: ~'calc(100% - 32px)';
}

.markdown p > img {
  margin: 2.4em 1em;
  box-shadow: 0 8px 20px rgba(143, 168, 191, 0.35);
}

.markdown h1 {
  color: @site-heading-color;
  font-weight: 500;
  margin-bottom: 20px;
  margin-top: 8px;
  font-family: Lato, @font-family;
  .subtitle {
    margin-left: 12px;
  }
}

.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  color: @site-heading-color;
  font-family: Lato, @font-family;
  margin: 1.6em 0 0.6em;
  font-weight: 500;
  clear: both;
}

.markdown h1 {
  font-size: 30px;
  line-height: 38px;
}

.markdown h2 {
  font-size: 24px;
  line-height: 32px;
}

.markdown h3 {
  font-size: 18px;
}

.markdown h4 {
  font-size: 16px;
}

.markdown h5 {
  font-size: 14px;
}

.markdown h6 {
  font-size: 12px;
}

.markdown hr {
  height: 1px;
  border: 0;
  background: #e9e9e9;
  margin: 16px 0;
  clear: both;
}

.markdown p,
.markdown pre {
  margin: 1em 0;
}

.markdown ul,
.markdown ol {
  padding-left: 1em;
}

.markdown ul > li {
  list-style-type: circle;
  margin-left: 20px;
  padding-left: 4px;
  &:empty {
    display: none;
  }
}

.markdown ol > li {
  list-style-type: decimal;
  margin-left: 20px;
  padding-left: 4px;
}

.markdown ul > li > p,
.markdown ol > li > p {
  margin: 0.2em 0;
  padding: 0;
}

.markdown pre {
  border-radius: @border-radius-sm;
  background: #f2f4f5;
}

.markdown pre code {
  border: none;
  margin: 0;
  padding: 0;
  color: @site-text-color;
  overflow: auto;
}

.markdown strong,
.markdown b {
  font-weight: 700;
}

.markdown table {
  border-collapse: collapse;
  border-spacing: 0;
  empty-cells: show;
  border: 1px solid @site-border-color-split;
  width: 100%;
  margin: 8px 0 16px;
  th,
  td {
    border: 1px solid @site-border-color-split;
    padding: 8px;
  }
  th {
    white-space: nowrap;
    color: #5c6b77;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.02);
  }
}

.markdown blockquote {
  font-size: 90%;
  color: @site-text-color-secondary;
  border-left: 4px solid @site-border-color-split;
  padding-left: 0.8em;
  margin: 1em 0;
  p {
    margin: 0;
  }
}

.markdown .anchor {
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-left: 8px;
}

.markdown .waiting {
  color: #ccc;
  cursor: not-allowed;
}

.markdown a.edit-button {
  line-height: 12px;
  display: inline-block;
  margin-left: 10px;
  height: 12px;
  text-decoration: none;
  font-weight: 400;
  i {
    color: @site-text-color-secondary;
    &:hover {
      color: @primary-color;
    }
  }
  .anticon {
    display: block;
    font-size: 16px;
  }
}

.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
  opacity: 1;
  display: inline-block;
}

.markdown > br,
.markdown > p > br {
  clear: both;
}

.markdown code {
  margin: 0 4px;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  border: 1px solid #eee;
}

.markdown.api-container table {
  td {
    &:first-child {
      font-weight: 500;
      width: 20%;
      color: #003a8c;
    }
    &:nth-child(3) {
      width: 22%;
      font-size: 13px;
      color: #c41d7f;
      word-break: break-all;
    }
    &:last-child {
      width: 13%;
      font-size: 13px;
    }
    &:nth-child(3),
    &:last-child {
      code {
        margin: 0;
        padding: 0;
        background: none;
        border: none;
      }
    }
  }
}

// For Changelog
.markdown {
  ul.ant-timeline {
    li.ant-timeline-item {
      list-style: none;
      margin: 0;
      padding: 0 0 30px;
      .ant-timeline-item-content {
        font-size: 14px;
        padding-left: 32px;
        position: relative;
        top: -14px;
        > h2 {
          margin-top: 0;
          padding-top: 0.5px;
        }
      }
    }
    li.ant-timeline-item:first-child {
      margin-top: 40px;
    }
  }
}

// For icon
.markdown {
  .component,
  .directive {
    padding: 1px 10px;
    font-size: 12px;
    border-radius: 4px;
    line-height: 18px;
    display: inline;
    vertical-align: middle;
    color: #fff;
    margin-left: 8px;
    font-weight: 400;
    text-transform: uppercase;
  }
  .component {
    color: #1890ff;
    border: 2px solid #1890ff;
  }
  .directive {
    color: #eb2f96;
    border: 2px solid #eb2f96;
  }
  .deprecated {
    display: inline-block;
    color: #f50;
    font-style: normal;
    &:before {
      content: 'D';
    }
  }
}
